import 'package:core_package/core_package.dart';
import 'package:flutter/material.dart';

class MyAssetImage extends StatelessWidget {
  final String image;
  final double? width;
  final double? height;
  final BoxFit fit;
  final double radius;

  const MyAssetImage(this.image, {
    Key? key,
    this.width,
    this.height,
    this.fit = BoxFit.fill,
    this.radius = 0,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build

    return ClipRRect(
      borderRadius: BorderRadius.circular(radius),
      child: Image.asset(
        MyAssetsImages.setAssetsImagesPath(image),
        width: width,
        height: height,
        fit: fit,
      ),
    );
  }
}
